package com.ideal.manage.esms.controller.config;

import com.ideal.manage.esms.bean.alarm.Alarm;
import com.ideal.manage.esms.service.alarm.AlarmService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by jingzigao on 2018/4/26.
 */

    @Controller
    @RequestMapping("macs")
    public class AddressConf {

        @Resource
        private AlarmService alarmService;


        /**
         * 警告列表请求
         * @param macId
         * @return
         */
        @ResponseBody
        @RequestMapping(value="/{MacId}",method= RequestMethod.GET)
        public Alarm alarmData(@PathVariable int macId){

            Alarm alarm1 = new Alarm();
            alarm1.setContent("192.168.1.10");
            alarm1.setSource("502");
            alarm1.setGrade("2000");
            alarm1.setStatus(1L);
            alarm1.setStartTime(new Date());
            alarm1.setEndTime(new Date());

            return alarm1;
        }


}
